﻿using GrainManage.Entities.Column;
using GrainManage.Proxy;
using GrainManage.Web.Common;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;

namespace GrainManage.Web.Controllers
{
    public class ColumnController : BaseController
    {
        [HttpPost]
        public ActionResult ColumnHeaderMap()
        {
            var input = new InputGetColumnHeader
            {
                Authentication = CurrentAccount,
                PageIndex = 0,
                PageSize = int.MaxValue
            };
            var columnProxy = ObjectFactory.ColumnProxy;
            var result = columnProxy.GetColumnHeader(input);
            if (result.Status.StatusCode == 1)
            {
                return View(result.Columns);
            }
            else
            {
                return View(Constant.RestStatusView, result);
            }
        }
    }
}
